package com.example.teamtribe.main.club.estimate;

import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.example.teamtribe.R;
import com.example.teamtribe.base.BaseActivity;
import com.example.teamtribe.database.Estimate;

import org.litepal.crud.DataSupport;

import java.util.ArrayList;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class EstimateListActivity extends BaseActivity {

    @BindView(R.id.tv_title)
    TextView tvTitle;
    @BindView(R.id.iv_more)
    ImageView ivMore;
    @BindView(R.id.rv_estimate)
    RecyclerView rvEstimate;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_estimate_list);
        ButterKnife.bind(this);
        tvTitle.setText("评比统计");
        ivMore.setVisibility(View.VISIBLE);
        ivMore.setImageResource(R.drawable.ic_share);
        rvEstimate.setLayoutManager(new LinearLayoutManager(this));
        rvEstimate.setAdapter(new EstimateListAdapter(new ArrayList<>(DataSupport.findAll(Estimate.class))));
    }

    @OnClick(R.id.fab_add)
    public void onViewClicked() {
    }
}
